﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;

namespace BackupWebRole.Areas.Admin.Controllers
{
    [Authorize()]
    public class AdminController : Controller
    {
        //
        // GET: /Admin/Admin/

        public ActionResult Index()
        {
            return View();
        }
        [HttpPost()]
        public ActionResult Index(string password)
        {
            var member= Membership.GetUser("admin");
            member.ChangePassword(member.ResetPassword(), password);
            ViewData["Message"] = "password changed!";//TODO : change this
            return View();
        }
    }
}
